<template>
  <!-- 密码配置页面 -->
  <div style="height:100%">
    <el-card style="height:90%">
      <h2 :style="'font-size:18px'">密码配置</h2>
      <el-row>
        <br />
        <br />
        <el-form
          :model="pwdConfigForm"
          :rules="rules"
          :label-position="'right'"
          label-width="300px"
        >
          <el-col :span="12">
            <el-form-item label="密码长度最小值(6-20)：" prop="minLength">
              <el-input
                v-model="pwdConfigForm.minLength"
                style="width:200px"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="密码长度最大值(6-20)：" prop="maxLength">
              <el-input
                v-model="pwdConfigForm.maxLength"
                style="width:200px"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否包含大写英文字母(A-Z)：" prop="containsAZ">
              <el-select
                v-model="pwdConfigForm.containsAZ"
                placeholder="请选择..."
                style="width:200px"
              >
                <el-option
                  v-for="item in dictList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否包含小写英文字母(a-z)：" prop="containsaz">
              <el-select
                v-model="pwdConfigForm.containsaz"
                placeholder="请选择..."
                style="width:200px"
              >
                <el-option
                  v-for="item in dictList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否包含数字(0-9)：" prop="contains09">
              <el-select
                v-model="pwdConfigForm.contains09"
                placeholder="请选择..."
                style="width:200px"
              >
                <el-option
                  v-for="item in dictList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              label="包含特殊字符(多个依次填写)："
              prop="containsSpecialChars"
            >
              <el-input
                v-model="pwdConfigForm.containsSpecialChars"
                style="width:200px"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="不包含用户名：" prop="notContainsUsername">
              <el-select
                v-model="pwdConfigForm.notContainsUsername"
                placeholder="请选择..."
                style="width:200px"
              >
                <el-option
                  v-for="item in dictList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              label="历史密码重复次数(0-20)："
              prop="notRepeatHisNumbs"
            >
              <el-input
                v-model="pwdConfigForm.notRepeatHisNumbs"
                style="width:200px"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="首次登录是否修改：" prop="atFirstLogin">
               <el-select
                v-model="pwdConfigForm.atFirstLogin"
                placeholder="请选择..."
                style="width:200px"
              >
                <el-option
                  v-for="item in dictList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              label="密码修改间隔时间(30天及以上)："
              prop="lastTimeIn"
            >
              <el-input
                v-model="pwdConfigForm.lastTimeIn"
                style="width:200px"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="密码锁定错误次数(0-20)：" prop="errorNumbs">
              <el-input
                v-model="pwdConfigForm.errorNumbs"
                style="width:200px"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
      <br />
      <br />
      <el-row>
        <el-col style="text-align:center">
          <el-button type="primary" style="width:200px" @click="saveFunc">
            确 认
          </el-button>
        </el-col>
      </el-row>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      dictList: [
        { value: "0", label: "撤销" },
        { value: "1", label: "启用" }
      ],
      pwdConfigForm: {
        operateType: "",
        minLength: "6",
        maxLength: "8",
        containsAZ: "0",
        containsaz: "0",
        contains09: "0",
        containsSpecialChars: "",
        notContainsUsername: "0",
        notRepeatHisNumbs: "20",
        atFirstLogin: "1",
        lastTimeIn: "180",
        errorNumbs: "20"
      },
      rules: {
        minLength: [
          { required: true, message: "该输入项为必输项", trigger: "blur" }
        ],
        maxLength: [
          { required: true, message: "该输入项为必输项", trigger: "blur" }
        ],
        notRepeatHisNumbs: [
          { required: true, message: "该输入项为必输项", trigger: "blur" }
        ],
        lastTimeIn: [
          { required: true, message: "该输入项为必输项", trigger: "blur" }
        ],
        errorNumbs: [
          { required: true, message: "该输入项为必输项", trigger: "blur" }
        ]
      }
    };
  },
  created() {},
  methods: {
    saveFunc() {
        this.$message.success("数据保存成功")
    }
  }
};
</script>

<style lang="scss" scoped>
</style>